/*
 * InitialChoiceFrame.java
 *
*/
package lpr.minikazaa.minikazaaclient;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 *
 * @author  Andrea Di Grazia, Massimiliano Giovine
 * @date 15/08/2008
 * @file InitialChoiceFrame.java
 */
public class InitialChoiceFrame extends javax.swing.JFrame {

    /** Crea un nuovo form InitialChoiceFrame */
    public InitialChoiceFrame() {
       
        initComponents();

        super_node_bt.addActionListener(
                new ActionListener() {

                    public void actionPerformed(ActionEvent event) {
                        SupernodeConfigurationFrame sn_config = new SupernodeConfigurationFrame();
                        sn_config.setLocationRelativeTo(null);
                        sn_config.setVisible(true);
                        dispose();
                        
                    }
                });

        ordinary_node_bt.addActionListener(
                new ActionListener() {

                    public void actionPerformed(ActionEvent event) {
                        OrdinarynodeConfigurationFrame sn_config = new OrdinarynodeConfigurationFrame();
                        sn_config.setLocationRelativeTo(null);
                        sn_config.setVisible(true);
                        dispose();
                    }
                });
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        super_node_bt = new javax.swing.JButton();
        ordinary_node_bt = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Mini-Kazaa");
        setResizable(false);
        setUndecorated(true);

        super_node_bt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lpr/minikazaa/icons/sn_icon.png"))); // NOI18N
        super_node_bt.setText("Super Node");

        ordinary_node_bt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lpr/minikazaa/icons/on_icon.png"))); // NOI18N
        ordinary_node_bt.setText("Ordinary Node");

        jLabel1.setFont(new java.awt.Font("DejaVu Sans", 0, 24));
        jLabel1.setText("What do you want to be?");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(118, Short.MAX_VALUE)
                .addComponent(super_node_bt, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(95, 95, 95)
                .addComponent(ordinary_node_bt)
                .addGap(121, 121, 121))
            .addGroup(layout.createSequentialGroup()
                .addGap(141, 141, 141)
                .addComponent(jLabel1)
                .addContainerGap(147, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ordinary_node_bt)
                    .addComponent(super_node_bt))
                .addGap(36, 36, 36))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JButton ordinary_node_bt;
    private javax.swing.JButton super_node_bt;
    // End of variables declaration//GEN-END:variables

}
